{% extends "wechat/layout.html" %}

{% set title = '账户信息' %}
{% block contents %}
<div class="m-userinfo">
	<div class="username">用户名：{{ current_user.school.code }}.{{ form.username.data }}</div>
	<form action=""  method="POST">
	<ul class="userinfo">

		{{ form.hidden_tag() }}
        <li>
            <span class="left">学生姓名</span>
            <span class="right">
                <input type="text" name="name" value="{{ form.name.data }}">
            </span>
        </li>
        <li>
            <span class="left">学生性别</span>
            <span class="right">
                <label><input type="radio" name="gender" value="1"{% if form.gender.data == '1' %} checked{% endif %}>男</label>
                <label><input type="radio" name="gender" value="2"{% if form.gender.data == '2' %} checked{% endif %}>女</label>
            </span>
        </li>
        <li>
            <span class="left">学生生日</span>
            <span class="right">
                <input type="date" name="day_of_birth" value="{{ form.day_of_birth.data }}">
            </span>
        </li>
        <li>
            <span class="left">家长姓名</span>
            <span class="right">
                <input type="text" name="parent_name" value="{{ form.parent_name.data }}"/>
            </span>
        </li>
        {#
            <li>
                <span class="left">家长电话</span>
                <span class="right">
                    <input type="tel" name="parent_phone" value="{{ form.parent_phone.data }}">
                </span>
            </li>
        #}
        <li>
            <span class="left">家长Email</span>
            <span class="right">
                <input type="email" name="parent_email" value="{{ form.parent_email.data }}">
            </span>
        </li>
        <li><a href="{{ url_for('wechat.chpass') }}" class="ch-password">修改密码<i class="iconfont icon-right"></i></a></li>
		<button type='submit' class="btn-save">保存</button>
	</ul>
	<form>
	<div class="qr-code">
		<div class="title">扫码绑定微信推送成绩</div>
		<img id="qr_code" src="{{ url_for('static', filename='wx_qr_code/' + qr_file_name) }}" />
	</div>
</div>

<style type="text/css">
#qr_code{width:145px;height:145px;overflow:hidden;border:none;}
.qr_title{text-align:center}
</style>
{% endblock %}
